////For json2.js
var jsonHelper2 = function(){};

jsonHelper2.prototype.escapeHtmlEx = function(object){
	var rtnValue = "";
	var escapeDivId = "helperDiv";
	var escapeDiv = $("<div id='"+escapeDivId+"' />").appendTo("body");
	//log(JSON.stringify(object));
	
	$(escapeDiv).html(JSON.stringify(object));
	rtnValue = $(escapeDiv).text();
	$(escapeDiv).remove();
	//log(rtnValue);
	
	return rtnValue;
};

jsonHelper2.prototype.stringToJsonObj = function(string){
	return JSON.parse(this.replaceReturn(string));
};

jsonHelper2.prototype.jsonObjToString = function(object){
	var strObj = JSON.stringify(object);
		
	return this.replaceReturn(strObj);
};

jsonHelper2.prototype.replaceReturn = function(str){
	var rtnValue = "";
	rtnValue = (str != null && str != "undefined")?str.replace(/\r/g, "").replace(/\n/g, ""):"";
	
	return rtnValue;
};